var sequelize = require('../config/database');
var Sequelize = require('sequelize');

var News = sequelize.define('news',{
  title:{
    type:Sequelize.STRING,
    field:'title',
    comment:'标题'
  },
  link:{
    type:Sequelize.STRING,
    field:'link',
    comment:'链接地址'
  },
  date:{
    type:Sequelize.STRING,
    field:'date',
    comment:'日期'
  },
  author:{
    type:Sequelize.STRING,
    field:'author',
    comment:'作者'
  },
  description:{
    type:Sequelize.TEXT,
    field:'description',
    comment:'描述'
  },
  guid:{
    type:Sequelize.STRING,
    field:'guid',
    comment:'唯一的id'
  },
  cate:{
    type:Sequelize.STRING,
    field:'cate',
    comment:'分类'
  },
  c_cate:{
    type:Sequelize.STRING,
    field:'c_cate',
    comment:'子分类'
  }

},{
  tableName:'news'
});

module.exports = News;